package com.qfedu.knowledge.controller;

import com.qfedu.knowledge.entity.dto.QueryDTO;
import com.qfedu.knowledge.service.ExportExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ExportExcelController
 * @Author ykx
 * @Date 2024/5/20 10:23
 * @Version 1.0
 */
@RequestMapping("/knowledge")
@RestController
public class ExportExcelController {

    @Autowired
    private ExportExcelService exportExcelService;

    @PostMapping("/exportExcel")
    public ResponseEntity<byte[]> exportQuestion(@RequestBody QueryDTO queryDTO) {
        return exportExcelService.exportQuestion(queryDTO);
    }

}
